def min_index(arr):
    """最小值索引"""
    small_index = 0
    for i in range(1, len(arr)):
        if arr[i] < arr[small_index]:
            small_index = i
    return small_index


def select_sort(arr):
    '''选择排序'''
    new_arr = []
    for i in range(len(arr)):
        index = min_index(arr)
        new_arr.append(arr.pop(index))
    return new_arr


abc = [4, 2, 8, 9, 10, 1]
print(select_sort(abc))


